package com.guigusuqi.survey.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author suqi
 * @since 2022-04-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("survey_user_questionnaire")
@ApiModel(value="UserQuestionnaire对象", description="")
public class UserQuestionnaire implements Serializable
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "答题记录id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "用户id")
    private String openid;

    @ApiModelProperty(value = "问题id")
    private String questionId;

    @ApiModelProperty(value = "答案")
    private String userAnswer;

    @ApiModelProperty(value = "问题得分")
    private Integer questionScore;

    @ApiModelProperty(value = "问题")
    //在数据库中是否存在
    @TableField(exist = false)
    private String question;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "更新者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "是否删除")
    @TableLogic(value = "0" ,delval = "1")
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;


}
